package org.car.world.service.impl;

import java.util.List;

import org.car.world.core.entily.LovecarTable;
import org.car.world.core.mapper.LovecarTableMapper;
import org.car.world.service.LovecarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(rollbackFor = {RuntimeException.class, Exception.class})
public class LovecarServiceImpl implements LovecarService {

    @Autowired
    LovecarTableMapper lovecarTableMapper;

    @Override
    public int deleteByPrimaryKey(Integer lovecarId) {
        return lovecarTableMapper.deleteByPrimaryKey(lovecarId);
    }

    @Override
    public int insert(LovecarTable record) {
        return lovecarTableMapper.insert(record);
    }

    @Override
    public LovecarTable selectByPrimaryKey(Integer lovecarId) {
        return lovecarTableMapper.selectByPrimaryKey(lovecarId);
    }

    @Override
    public List<LovecarTable> selectAll() {
        return lovecarTableMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(LovecarTable record) {
        return lovecarTableMapper.updateByPrimaryKey(record);
    }

}
